<template>
  <div>
    <!-- <div class="footer_wrap">
      <router-link to="/find">发现音乐</router-link>
      <router-link to="/my">我的音乐</router-link>
      <router-link to="/part?name=康有为&age=勺">朋友 query</router-link>
      <router-link to="/part/康有为/勺">朋友 params</router-link>、
    </div>
    <div class="top">
      <router-view></router-view>
    </div> -->
    <div class="footer_wrap">
      <span @click="goto('/find', 'Find')">荒</span>
      <span @click="goto('/my', 'My')">大荒</span>
      <span @click="goto('/part?name=康有为&age=勺', 'Part')">天帝</span>
      <span @click="goto('/part')">叶凡</span>
    </div>
    <div class="top">
      <router-view></router-view>
    </div>
  </div>
</template>
<script>
export default {
  methods: {
    goto(path, name) {
      this.$router.push({
        name,
      });
    },
  },
};
</script>

<style scoped>
.footer_wrap {
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  width: 100%;
  text-align: center;
  background-color: #333;
  color: #ccc;
}
.footer_wrap a,
span {
  flex: 1;
  text-decoration: none;
  padding: 20px 0;
  line-height: 20px;
  background-color: #333;
  color: #ccc;
  border: 1px solid black;
}
.footer_wrap a:hover,
span:hover {
  background-color: #555;
}
.top {
  padding-top: 62px;
}

.footer_wrap a.router-link-active,
span.router-link-active {
  color: white;
  background: pink;
}
</style>